import request from '@/plugins/axios'

export function fenRole(roleIds,userId) {
    return request({
        url: '/emp/fenRole?userId='+userId+'&roleIds='+roleIds
    })
}
export function getRoleIds(params) {
    return request({
        url: '/emp/getRolesIds/'+params
    })
}
export function handleUpdate(params) {

    return request({
        url: '/emp/update',
        method: "put",
        data: params
    })
}
export function saveEmp(params) {

    return request({
        url: '/emp/save',
        method: "post",
        data: params
    })
}
export function getPositions() {
    return request({
        url: '/emp/getPositions'
    })
}
export function getRoles() {
    return request({
        url: '/emp/getRoles'
    })
}
export function getDepts() {

    return request({
        url: '/emp/getDepts'
    })
}
export function handleDelete(params) {
    console.log(params);
    return request({
        url: '/emp/remove/'+params
        // url: '/emp/remove/'+params.id+"/"+params.userId
    })
}
export function search(params) {
    console.log(params);
    return request({
        url: '/emp/getPage',
        method: "post",
        data: params
    })
}

export function updateStatus(params) {
    console.log(params);
    return request({
        url: '/emp/updateStatus?status='+params.status+'&id='+params.userId
    })
}